package au.com.betaversion.domain;

import java.util.Set;

import org.springframework.data.neo4j.annotation.GraphId;
import org.springframework.data.neo4j.annotation.Indexed;
import org.springframework.data.neo4j.annotation.RelatedTo;

public class Actor {
	
	@GraphId 
	private Long id;
	
	@Indexed 
	private String actorId;
	
	private String name;
	
	@RelatedTo(type = "ACTS_IN")
	private Set<Movie> filmography;
	
	public Role playedIn(Movie movie, String role) {
		return new Role(movie, this, role);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getActorId() {
		return actorId;
	}

	public void setActorId(String actorId) {
		this.actorId = actorId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Movie> getFilmography() {
		return filmography;
	}

	public void setFilmography(Set<Movie> filmography) {
		this.filmography = filmography;
	}

}
